package com.hanhai.zrb.model.user.enums;

public enum UserFollowRelationEnum {

	NONE(0, "未关注"), FROM(1, "已关注"),TO(2,"被关注"),
	EACH(3,"互相关注");

	private Integer code;

	private String value;

	public Integer getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}

	private UserFollowRelationEnum(int code, String value) {
		this.code = code;
		this.value = value;
	}
	
	public static UserFollowRelationEnum getEnumByCode(Integer code){
		for(UserFollowRelationEnum relation:UserFollowRelationEnum.values()){
			if(relation.getCode() == code.intValue()){
				return relation;
			}
		}
		return null;
	}
}
